import { createApp } from "vue";
import "@/style/blog.less";
// 如果想element-plus的组件生效，必须引入全局引入element-plus样式
import "element-plus/dist/index.css";
import App from "@/App.vue";

// 引入定义的路由
import router from "@/router/index";
// 引入对外暴露的pinia实例
import pinia from "@/store/index";
// 引入element-plus
import ElementPlus from "element-plus";
// @ts-ignore  EP组件默认为英文，此处引入中文
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// 引入element-plus的图标库
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

const app = createApp(App);

// 注册插件
app.use(router);
app.use(pinia);
app.use(ElementPlus,{locale:zhCn});

// 此处参考官网，意为将图标库中的每个图标都注册成组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.mount("#app");

// Ctrl + shift + ` 快速新建终端
